package io.renren.modules.archive.service.impl;

import io.renren.common.utils.StringUtils;
import org.springframework.stereotype.Service;
import java.util.Map;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import io.renren.common.utils.PageUtils;
import io.renren.common.utils.Query;

import io.renren.modules.archive.dao.BgqxDao;
import io.renren.modules.archive.entity.BgqxEntity;
import io.renren.modules.archive.service.BgqxService;


@Service("bgqxService")
public class BgqxServiceImpl extends ServiceImpl<BgqxDao, BgqxEntity> implements BgqxService {

    @Override
    public PageUtils queryPage(Map<String, Object> params) {
        IPage<BgqxEntity> page = this.page(
                new Query<BgqxEntity>().getPage(params),
                new QueryWrapper<BgqxEntity>()
                .like(StringUtils.isNotBlank((String) params.get("key")),"CONTENT",(String) params.get("key"))
        );

        return new PageUtils(page);
    }

}